package com.eva.dao.system.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;

/**
 * 系统定时任务日志
 * @author Eva.Caesar Liu
 * @date 2022/03/05 10:30
 */
@Data
@ApiModel("系统定时任务日志")
@TableName("`SYSTEM_JOB_LOG`")
public class SystemJobLog {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键", example = "1")
    private Integer id;

    @ApiModelProperty(value = "定时任务ID", example = "1")
    private Integer jobId;

    @ApiModelProperty(value = "任务名称")
    private String jobName;

    @ApiModelProperty(value = "分片ID", example = "1")
    private Integer snippetId;

    @ApiModelProperty(value = "分片编码")
    private String snippetCode;

    @ApiModelProperty(value = "业务时间戳")
    private Date businessTime;

    @ApiModelProperty(value = "执行开始时间")
    private Date runTimeStart;

    @ApiModelProperty(value = "执行结束时间")
    private Date runTimeEnd;

    @ApiModelProperty(value = "耗时", example = "1")
    private Integer runSpendTime;

    @ApiModelProperty(value = "执行参数")
    private String parameters;

    @ApiModelProperty(value = "处理总数", example = "1")
    private Integer handleTotalSize;

    @ApiModelProperty(value = "处理成功数", example = "1")
    private Integer handleSuccessSize;

    @ApiModelProperty(value = "执行任务的服务器IP")
    private String serverIp;

    @ApiModelProperty(value = "状态（0执行失败，1执行成功，2跳过，-1未得到处理）", example = "1")
    private Byte status;

    @ApiModelProperty(value = "任务执行上下文")
    private String context;

    @ApiModelProperty(value = "触发类型，SYSTEM-系统定时触发，MANUAL-手动触发")
    private String triggerType;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "日志创建时间")
    private Date createTime;

}
